--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Node / ReticulumProjects / Sideband.git / files / sbapp / kivymd / tools / patterns / MVC / Utility / observer.py_tmp
Displaying Raw • Download
sbapp/kivymd/tools/patterns/MVC/Utility/observer.py_tmp b4f0ff722e954d1edc2d4d433f4bd95d362bcc3a (b4f0ff72) Text, 724 B
T8b949e# Of course, "very flexible Python" allows you to do without an abstract
T8b949e# superclass at all or use the clever exception `NotImplementedError`. In my
T8b949e# opinion, this can negatively affect the architecture of the application.
T8b949e# I would like to point out that using Kivy, one could use the on-signaling
T8b949e# model. In this case, when the state changes, the model will send a signal
T8b949e# that can be received by all attached observers. This approach seems less
T8b949e# universal - you may want to use a different library in the future.
Te6edf3class Te6edf3ObserverTff7b72:
Ta5d6ff"Tffea00""Ta5d6ffAbstract superclass for all observers.Tffea00""Ta5d6ff"
Te6edf3def Te6edf3model_is_changedTb4b4b4(Te6edf3selfTb4b4b4)Tff7b72:
Ta5d6ff"Tffea00""
Ta5d6ff The method that will be called on the observer when the model changes.
Tffea00""Ta5d6ff"
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────